<?php

function hgn_db_add_address_record($value){
  $ts = db_transaction();
  try{
    if(drupal_write_record(HGNT_ADDRESS, $value) != SAVED_NEW){
      throw new Exception("Error in saving address");
    }
  } catch(exception $e){
    $ts->rollback();
    watchdog("db_exception", $e);
    return FALSE;
  }
  return TRUE;
}